package com.songpeng.consumer.demo.controller;

import api.baseplatform.model.UserInfo;
import api.baseplatform.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @DubboReference
    private UserService userService;

    @GetMapping(value = "/consumer/test")
    public String test() {
        UserInfo userInfo = userService.getUser("Dubbo", "123456");
        return userInfo.toString();
    }

}
